package com.hksj.call.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hksj.call.entity.CallOrder;
import com.hksj.call.query.CallOrderQuery;
import com.hksj.call.service.CallOrderService;
import com.hksj.common.core.model.Rest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "call-呼叫清洁")
@RestController
@RequestMapping("/api/callOrder")
public class CallOrderController {
    @Autowired
    private CallOrderService callOrderService;

    @PostMapping("/pageCallOrder")
    @ApiOperation(value = "分页查询任务单",response = CallOrder.class)
    public Rest<Page<CallOrder>> pageCallOrder(@RequestBody CallOrderQuery query){
        Page<CallOrder> page = callOrderService.pageCallOrder(query);
        return Rest.ok(page);
    }
}
